﻿using System;
using System.Collections.Generic;

namespace DatabaseGroup.SSIS.SourceAdapters.View
{
    /// <summary>
    /// Defines functionality relating to the General tab of the Editor view
    /// </summary>
    public interface IEditorGeneralView : IEditorBaseView
    {
        /// <summary>
        /// Indicates the selected file connection has been changed
        /// </summary>
        event EventHandler FileConnectionChange;

        /// <summary>
        /// Binds the controls contained on the general tab to the provided settings object
        /// </summary>
        /// <param name="settings">The values to apply to the controls</param>
        void BindGeneralTab(GeneralTabSettings settings);

        /// <summary>
        /// Populates the file connection list
        /// </summary>
        /// <param name="connections">The list of file connections</param>
        /// <param name="selected">The file connection that should be selected</param>
        void PopulateFileConnections(List<string> connections, string selected);

        /// <summary>
        /// Populates the Code Page list with an array of items
        /// </summary>
        /// <param name="items">The array of items to populate the list with</param>
        void PopulateCodePageList(string[] items);

        /// <summary>
        /// Populates the Locale list with an array of items
        /// </summary>
        /// <param name="items">The array of items to populate the list with</param>
        void PopulateLocaleList(string[] items);
    }
}
